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

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

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

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

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

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

b = A("b")
i = B("i")
m = C("m")
a = D("a")
j = E("j")
k = F("k")
l = B("l")
c = D("c")
e = A("e")
f = C("f")

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

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

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

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

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

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

b = A("b")
i = B("i")
m = C("m")
a = D("a")
j = E("j")
k = F("k")
l = B("l")
c = D("c")
e = A("e")
f = C("f")

b.w = j
b.o = m
b.u = e
i.r = k
i.s = j
i.o = j
i.u = c
i.v = l
m.w = l
m.v = k
a.y = f
a.w = k
a.o = k
j.o = e
j.t = f
k.r = l
k.x = j
k.u = j
k.q = j
k.p = a
k.w = c
l.r = k
l.s = j
l.o = j
l.u = c
l.v = i
c.y = m
c.w = k
c.o = k
e.w = j
e.o = m
e.u = b
f.w = i
f.v = k
assert j.t.w.u.o.w.o.u.o.w.t.txt == "f"