class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.x: C = None
        self.t: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.y: B = None
        self.u: B = None
        self.r: F = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.txt = txt

m = A("m")
l = B("l")
c = C("c")
d = D("d")
g = E("g")
h = F("h")
k = G("k")
n = H("n")

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: E = None
        self.x: C = None
        self.t: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: F = None
        self.y: B = None
        self.u: B = None
        self.r: F = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: D = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: C = None
        self.txt = txt

m = A("m")
l = B("l")
c = C("c")
d = D("d")
g = E("g")
h = F("h")
k = G("k")
n = H("n")

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