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

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

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

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

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

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

h = A("h")
c = B("c")
l = C("l")
i = D("i")
d = E("d")
b = F("b")
g = A("g")
f = C("f")
n = A("n")

h.s = n
h.v = d
h.u = b
h.t = i
h.q = i
c.t = i
c.q = f
l.s = f
l.z = c
l.o = d
l.t = d
l.q = i
i.t = b
d.x = b
d.w = c
d.y = c
d.s = n
d.p = l
d.u = g
b.o = h
b.u = h
g.s = n
g.v = d
g.u = b
g.t = i
g.q = i
f.s = l
f.z = c
f.o = d
f.t = d
f.q = i
n.s = h
n.v = d
n.u = b
n.t = i
n.q = i
assert i.t.u.t.t.u.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.u: F = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

h = A("h")
c = B("c")
l = C("l")
i = D("i")
d = E("d")
b = F("b")
g = A("g")
f = C("f")
n = A("n")

h.s = n
h.v = d
h.u = b
h.t = i
h.q = i
c.t = i
c.q = f
l.s = f
l.z = c
l.o = d
l.t = d
l.q = i
i.t = b
d.x = b
d.w = c
d.y = c
d.s = n
d.p = l
d.u = g
b.o = h
b.u = h
g.s = n
g.v = d
g.u = b
g.t = i
g.q = i
f.s = l
f.z = c
f.o = d
f.t = d
f.q = i
n.s = h
n.v = d
n.u = b
n.t = i
n.q = i
assert i.t.u.t.t.u.s.txt == "n"