class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: G = None
        self.z: B = None
        self.x: H = None
        self.s: C = None
        self.y: B = None
        self.q: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: C = None
        self.z: A = None
        self.w: E = None
        self.v: C = None
        self.p: B = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.y: E = None
        self.txt = txt

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

g.p = l
g.u = k
g.w = k
g.z = a
g.x = c
g.s = b
g.y = e
g.q = j
e.o = a
e.p = k
e.y = l
b.q = k
b.y = e
j.u = l
n.u = e
n.y = g
l.s = k
l.q = b
l.v = b
l.o = b
l.z = g
l.w = n
l.p = e
l.t = e
k.x = g
c.q = k
c.u = b
c.y = n
a.o = e
a.p = k
a.y = l
assert b.y.o.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: G = None
        self.z: B = None
        self.x: H = None
        self.s: C = None
        self.y: B = None
        self.q: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: C = None
        self.z: A = None
        self.w: E = None
        self.v: C = None
        self.p: B = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: C = None
        self.y: E = None
        self.txt = txt

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

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