class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.q: A = None
        self.s: D = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.x: E = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

e = A("e")
g = B("g")
i = C("i")
l = D("l")
k = E("k")
d = F("d")
m = F("m")
b = E("b")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: A = None
        self.q: A = None
        self.s: D = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.x: E = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

e = A("e")
g = B("g")
i = C("i")
l = D("l")
k = E("k")
d = F("d")
m = F("m")
b = E("b")

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