class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.r: D = None
        self.v: F = None
        self.x: F = None
        self.o: F = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: D = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: F = None
        self.r: D = None
        self.v: F = None
        self.x: F = None
        self.o: F = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: D = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

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