class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.p: C = None
        self.s: C = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = 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.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: E = None
        self.t: C = None
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: E = 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.w: A = None
        self.txt = txt

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

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