class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.o: G = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.s: A = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: G = None
        self.q: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.y: E = None
        self.o: D = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

g.x = n
g.w = n
g.q = n
g.t = h
g.o = h
n.q = a
n.x = e
c.t = g
c.s = e
c.w = l
a.z = c
a.w = h
a.s = g
a.q = n
a.r = b
k.s = c
k.q = c
k.v = h
k.z = n
b.r = a
b.o = a
b.q = c
b.y = k
b.t = h
b.v = h
h.w = b
e.s = c
e.q = c
e.v = h
e.z = n
l.z = c
l.w = h
l.s = g
l.q = n
l.r = b
assert n.x.q.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: G = None
        self.o: G = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.s: A = None
        self.q: B = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: G = None
        self.q: C = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.y: E = None
        self.o: D = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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