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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: A = None
        self.y: C = None
        self.o: E = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: G = None
        self.o: A = None
        self.z: G = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

g = A("g")
j = B("j")
c = C("c")
b = D("b")
d = E("d")
m = F("m")
i = G("i")
k = H("k")
f = A("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: A = None
        self.y: C = None
        self.o: E = None
        self.v: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: G = None
        self.o: A = None
        self.z: G = None
        self.y: B = None
        self.w: B = None
        self.txt = txt

g = A("g")
j = B("j")
c = C("c")
b = D("b")
d = E("d")
m = F("m")
i = G("i")
k = H("k")
f = A("f")

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