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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.w: E = None
        self.u: D = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.s: E = None
        self.u: D = None
        self.v: B = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: D = None
        self.w: E = None
        self.u: D = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.s: E = None
        self.u: D = None
        self.v: B = None
        self.w: A = None
        self.p: A = None
        self.txt = txt

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

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