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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: F = None
        self.p: E = None
        self.y: C = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.v: H = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: G = None
        self.x: H = None
        self.o: H = None
        self.r: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: F = None
        self.p: E = None
        self.y: C = None
        self.w: C = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: F = None
        self.v: H = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: G = None
        self.x: H = None
        self.o: H = None
        self.r: E = None
        self.y: B = None
        self.txt = txt

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

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

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

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