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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.t: F = None
        self.s: E = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.t: F = None
        self.s: E = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

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

d.t = k
d.w = g
d.x = a
d.z = c
d.y = c
d.r = b
k.x = c
k.q = c
k.r = d
k.o = h
k.v = b
h.o = l
h.q = c
h.s = a
b.q = m
e.w = l
e.p = l
e.t = c
e.s = a
e.x = d
e.o = d
c.v = b
c.w = d
m.q = b
l.x = c
l.q = c
l.r = d
l.o = h
l.v = m
g.o = k
g.q = c
g.s = a
a.w = l
a.p = k
a.t = c
a.s = e
a.x = d
a.o = d
assert l.r.t.q.w.t.o.o.r.t.txt == "k"