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

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

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

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

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

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

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

f.t = h
f.u = l
f.q = k
h.v = b
h.o = k
h.q = l
e.r = b
g.z = k
g.u = h
g.r = j
k.w = j
k.r = b
k.x = f
k.o = g
k.q = l
a.y = k
b.r = e
l.v = b
l.o = k
l.q = h
j.y = k
assert j.y.x.u.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

f.t = h
f.u = l
f.q = k
h.v = b
h.o = k
h.q = l
e.r = b
g.z = k
g.u = h
g.r = j
k.w = j
k.r = b
k.x = f
k.o = g
k.q = l
a.y = k
b.r = e
l.v = b
l.o = k
l.q = h
j.y = k
assert j.y.x.u.q.v.txt == "b"