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

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

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

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

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

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

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

n.s = l
d.q = h
d.t = n
l.y = g
l.s = b
h.z = n
h.o = n
h.p = n
h.s = l
h.q = e
h.x = b
k.p = d
k.u = d
k.y = n
k.v = l
k.q = b
b.o = d
b.x = k
b.q = n
e.z = n
e.o = n
e.p = n
e.s = l
e.q = h
e.x = b
g.p = d
g.u = d
g.y = n
g.v = l
g.q = b
assert h.x.q.s.s.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

n.s = l
d.q = h
d.t = n
l.y = g
l.s = b
h.z = n
h.o = n
h.p = n
h.s = l
h.q = e
h.x = b
k.p = d
k.u = d
k.y = n
k.v = l
k.q = b
b.o = d
b.x = k
b.q = n
e.z = n
e.o = n
e.p = n
e.s = l
e.q = h
e.x = b
g.p = d
g.u = d
g.y = n
g.v = l
g.q = b
assert h.x.q.s.s.o.q.txt == "h"