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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

b = A("b")
l = B("l")
j = C("j")
d = D("d")
f = E("f")
a = F("a")
e = F("e")
g = D("g")
c = E("c")

b.w = c
b.v = d
l.o = d
l.y = g
j.o = b
j.t = b
d.p = j
d.z = j
d.t = j
d.u = l
d.o = f
d.r = g
f.o = b
a.t = b
e.t = b
g.p = j
g.z = j
g.t = j
g.u = l
g.o = f
g.r = d
c.o = b
assert g.o.o.w.o.v.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

b = A("b")
l = B("l")
j = C("j")
d = D("d")
f = E("f")
a = F("a")
e = F("e")
g = D("g")
c = E("c")

b.w = c
b.v = d
l.o = d
l.y = g
j.o = b
j.t = b
d.p = j
d.z = j
d.t = j
d.u = l
d.o = f
d.r = g
f.o = b
a.t = b
e.t = b
g.p = j
g.z = j
g.t = j
g.u = l
g.o = f
g.r = d
c.o = b
assert g.o.o.w.o.v.u.txt == "l"