class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.s: G = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: A = None
        self.p: F = None
        self.z: F = None
        self.o: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.r: E = None
        self.p: A = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: A = None
        self.p: F = None
        self.z: F = None
        self.o: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.r: E = None
        self.p: A = None
        self.s: B = None
        self.txt = txt

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

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