class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: B = None
        self.t: E = None
        self.x: B = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.t: J = None
        self.z: H = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

g = A("g")
e = B("e")
n = C("n")
l = D("l")
a = E("a")
d = F("d")
k = G("k")
m = H("m")
h = I("h")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: C = None
        self.t: J = None
        self.z: H = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

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

g = A("g")
e = B("e")
n = C("n")
l = D("l")
a = E("a")
d = F("d")
k = G("k")
m = H("m")
h = I("h")
b = J("b")

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