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

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

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

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

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

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

a = A("a")
g = B("g")
d = C("d")
h = D("h")
k = E("k")
b = F("b")
l = C("l")
i = F("i")
j = B("j")
n = A("n")

a.s = j
a.t = i
g.s = b
g.p = b
g.o = b
g.r = l
d.o = b
d.x = b
d.s = a
h.v = i
h.q = l
h.w = l
h.p = b
k.v = i
k.t = i
k.r = h
k.q = h
k.z = n
b.s = h
b.x = h
b.o = i
b.u = d
l.o = b
l.s = a
l.x = i
i.s = h
i.x = h
i.o = b
i.u = d
j.s = i
j.p = i
j.r = d
j.o = b
n.s = g
n.t = i
assert d.s.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

a = A("a")
g = B("g")
d = C("d")
h = D("h")
k = E("k")
b = F("b")
l = C("l")
i = F("i")
j = B("j")
n = A("n")

a.s = j
a.t = i
g.s = b
g.p = b
g.o = b
g.r = l
d.o = b
d.x = b
d.s = a
h.v = i
h.q = l
h.w = l
h.p = b
k.v = i
k.t = i
k.r = h
k.q = h
k.z = n
b.s = h
b.x = h
b.o = i
b.u = d
l.o = b
l.s = a
l.x = i
i.s = h
i.x = h
i.o = b
i.u = d
j.s = i
j.p = i
j.r = d
j.o = b
n.s = g
n.t = i
assert d.s.t.s.txt == "h"