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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: D = None
        self.y: G = None
        self.z: C = None
        self.x: H = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: F = None
        self.y: B = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.q: B = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

b = A("b")
l = B("l")
a = C("a")
j = D("j")
h = E("h")
g = F("g")
c = G("c")
d = H("d")
e = E("e")
n = G("n")

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: D = None
        self.y: G = None
        self.z: C = None
        self.x: H = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: F = None
        self.y: B = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.q: B = None
        self.v: B = None
        self.u: E = None
        self.txt = txt

b = A("b")
l = B("l")
a = C("a")
j = D("j")
h = E("h")
g = F("g")
c = G("c")
d = H("d")
e = E("e")
n = G("n")

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