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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.q: D = None
        self.z: C = None
        self.y: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.q: D = None
        self.z: C = None
        self.y: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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