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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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