class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.r: G = None
        self.x: C = None
        self.z: I = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.w: D = None
        self.v: E = None
        self.o: F = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: G = None
        self.s: C = None
        self.w: I = None
        self.y: F = None
        self.r: F = None
        self.t: D = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.u: F = None
        self.q: D = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: A = None
        self.p: E = None
        self.z: H = None
        self.s: G = None
        self.w: E = None
        self.t: A = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

k = A("k")
e = B("e")
i = C("i")
d = D("d")
g = E("g")
c = F("c")
h = G("h")
n = H("n")
b = I("b")
m = C("m")

k.t = d
k.o = d
k.v = c
e.v = i
e.x = i
e.w = d
e.r = h
e.z = b
e.p = n
i.y = h
i.t = h
i.w = d
i.v = g
i.o = c
i.x = b
d.p = k
d.q = k
d.s = i
d.y = m
g.z = b
g.w = b
g.x = h
g.s = i
g.y = c
g.r = c
g.t = d
g.p = n
c.w = g
c.o = g
c.q = k
h.u = k
n.o = e
n.x = m
n.u = c
n.q = d
n.p = k
b.v = c
b.x = k
b.t = k
b.p = g
b.w = g
b.u = g
b.z = n
b.s = h
b.q = h
m.y = h
m.t = h
m.w = d
m.v = g
m.o = c
m.x = b
assert d.s.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.r: G = None
        self.x: C = None
        self.z: I = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: G = None
        self.w: D = None
        self.v: E = None
        self.o: F = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.s: C = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: G = None
        self.s: C = None
        self.w: I = None
        self.y: F = None
        self.r: F = None
        self.t: D = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.u: F = None
        self.q: D = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: A = None
        self.p: E = None
        self.z: H = None
        self.s: G = None
        self.w: E = None
        self.t: A = None
        self.q: G = None
        self.u: E = None
        self.txt = txt

k = A("k")
e = B("e")
i = C("i")
d = D("d")
g = E("g")
c = F("c")
h = G("h")
n = H("n")
b = I("b")
m = C("m")

k.t = d
k.o = d
k.v = c
e.v = i
e.x = i
e.w = d
e.r = h
e.z = b
e.p = n
i.y = h
i.t = h
i.w = d
i.v = g
i.o = c
i.x = b
d.p = k
d.q = k
d.s = i
d.y = m
g.z = b
g.w = b
g.x = h
g.s = i
g.y = c
g.r = c
g.t = d
g.p = n
c.w = g
c.o = g
c.q = k
h.u = k
n.o = e
n.x = m
n.u = c
n.q = d
n.p = k
b.v = c
b.x = k
b.t = k
b.p = g
b.w = g
b.u = g
b.z = n
b.s = h
b.q = h
m.y = h
m.t = h
m.w = d
m.v = g
m.o = c
m.x = b
assert d.s.x.s.txt == "h"