class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: G = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: H = None
        self.o: B = None
        self.r: A = None
        self.s: B = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.x: H = None
        self.q: A = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: C = None
        self.v: C = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.x: E = None
        self.p: E = None
        self.r: A = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.v: H = None
        self.t: B = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.y: C = None
        self.q: C = None
        self.s: G = None
        self.x: B = None
        self.txt = txt

k = A("k")
b = B("b")
c = C("c")
j = D("j")
l = E("l")
i = F("i")
g = G("g")
n = H("n")
m = H("m")

k.y = c
k.v = c
b.z = c
b.o = c
b.t = g
b.r = j
c.v = n
c.t = m
c.o = b
c.s = b
c.r = k
c.x = k
j.p = b
j.o = l
j.x = m
j.q = k
j.z = g
l.r = k
l.s = c
l.v = c
l.q = m
l.z = j
i.w = j
i.z = l
i.x = l
i.p = l
i.r = k
i.v = m
i.o = c
g.y = k
g.p = l
g.v = m
g.t = b
g.s = b
n.o = m
n.r = l
n.y = c
n.q = c
n.s = g
n.x = b
m.o = n
m.r = l
m.y = c
m.q = c
m.s = g
m.x = b
assert j.x.x.o.x.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: G = None
        self.r: D = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: H = None
        self.o: B = None
        self.r: A = None
        self.s: B = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.x: H = None
        self.q: A = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: C = None
        self.v: C = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.x: E = None
        self.p: E = None
        self.r: A = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.v: H = None
        self.t: B = None
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.y: C = None
        self.q: C = None
        self.s: G = None
        self.x: B = None
        self.txt = txt

k = A("k")
b = B("b")
c = C("c")
j = D("j")
l = E("l")
i = F("i")
g = G("g")
n = H("n")
m = H("m")

k.y = c
k.v = c
b.z = c
b.o = c
b.t = g
b.r = j
c.v = n
c.t = m
c.o = b
c.s = b
c.r = k
c.x = k
j.p = b
j.o = l
j.x = m
j.q = k
j.z = g
l.r = k
l.s = c
l.v = c
l.q = m
l.z = j
i.w = j
i.z = l
i.x = l
i.p = l
i.r = k
i.v = m
i.o = c
g.y = k
g.p = l
g.v = m
g.t = b
g.s = b
n.o = m
n.r = l
n.y = c
n.q = c
n.s = g
n.x = b
m.o = n
m.r = l
m.y = c
m.q = c
m.s = g
m.x = b
assert j.x.x.o.x.y.t.txt == "m"