class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: E = None
        self.r: C = None
        self.p: D = None
        self.x: G = None
        self.v: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: C = None
        self.s: A = None
        self.v: C = None
        self.q: A = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: C = None
        self.s: A = None
        self.v: C = None
        self.q: A = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

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