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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.s: D = None
        self.v: C = None
        self.z: B = None
        self.o: F = None
        self.txt = txt

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

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

a.r = e
a.u = e
a.o = j
a.x = l
a.s = c
e.z = j
e.q = j
e.w = c
e.v = l
l.z = c
l.s = j
l.v = j
l.o = f
j.r = e
f.r = a
f.u = a
f.s = j
f.v = l
f.z = e
f.o = c
c.t = j
c.q = e
g.r = a
g.u = a
g.s = j
g.v = l
g.z = e
g.o = c
assert l.o.v.v.r.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.u: B = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.s: D = None
        self.v: C = None
        self.z: B = None
        self.o: F = None
        self.txt = txt

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

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

a.r = e
a.u = e
a.o = j
a.x = l
a.s = c
e.z = j
e.q = j
e.w = c
e.v = l
l.z = c
l.s = j
l.v = j
l.o = f
j.r = e
f.r = a
f.u = a
f.s = j
f.v = l
f.z = e
f.o = c
c.t = j
c.q = e
g.r = a
g.u = a
g.s = j
g.v = l
g.z = e
g.o = c
assert l.o.v.v.r.v.o.txt == "f"