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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.r: A = None
        self.t: F = None
        self.q: B = None
        self.w: D = None
        self.txt = txt

c = A("c")
f = B("f")
b = C("b")
i = D("i")
e = E("e")
d = F("d")
m = G("m")
l = H("l")

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.r: A = None
        self.t: F = None
        self.q: B = None
        self.w: D = None
        self.txt = txt

c = A("c")
f = B("f")
b = C("b")
i = D("i")
e = E("e")
d = F("d")
m = G("m")
l = H("l")

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