class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.x: C = None
        self.u: C = None
        self.q: C = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.t: D = None
        self.w: C = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: A = None
        self.o: A = None
        self.z: E = None
        self.x: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

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

n = A("n")
f = B("f")
a = C("a")
h = D("h")
i = E("i")
j = F("j")
k = G("k")
l = C("l")
c = E("c")
b = D("b")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: G = None
        self.t: D = None
        self.w: C = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: A = None
        self.o: A = None
        self.z: E = None
        self.x: A = None
        self.u: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: C = None
        self.u: C = None
        self.p: A = None
        self.txt = txt

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

n = A("n")
f = B("f")
a = C("a")
h = D("h")
i = E("i")
j = F("j")
k = G("k")
l = C("l")
c = E("c")
b = D("b")

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