class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.t: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.z: B = None
        self.x: A = None
        self.o: E = None
        self.p: B = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

f.t = g
f.p = c
a.y = f
a.x = n
a.v = l
a.t = l
a.s = k
m.s = c
m.y = c
k.u = f
j.y = k
j.r = h
h.y = j
h.u = g
h.t = m
h.r = n
g.x = h
g.s = f
g.w = k
g.u = j
c.w = k
c.r = k
c.s = k
c.z = a
c.p = a
c.x = f
c.o = j
c.y = j
l.y = j
l.u = g
l.r = g
l.t = m
n.x = l
n.s = f
n.w = k
n.u = j
assert m.s.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.t: C = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: A = None
        self.w: D = None
        self.u: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: D = None
        self.z: B = None
        self.x: A = None
        self.o: E = None
        self.p: B = None
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

f.t = g
f.p = c
a.y = f
a.x = n
a.v = l
a.t = l
a.s = k
m.s = c
m.y = c
k.u = f
j.y = k
j.r = h
h.y = j
h.u = g
h.t = m
h.r = n
g.x = h
g.s = f
g.w = k
g.u = j
c.w = k
c.r = k
c.s = k
c.z = a
c.p = a
c.x = f
c.o = j
c.y = j
l.y = j
l.u = g
l.r = g
l.t = m
n.x = l
n.s = f
n.w = k
n.u = j
assert m.s.z.x.txt == "n"