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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.s: H = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.x: A = None
        self.w: A = None
        self.r: B = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: A = None
        self.u: G = None
        self.y: E = None
        self.w: A = None
        self.txt = txt

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

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

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

b.y = m
e.x = a
e.p = m
e.s = m
e.t = d
e.y = b
g.y = c
c.u = b
c.y = a
c.o = j
n.u = g
n.t = k
n.x = b
n.w = b
n.r = d
n.o = j
n.p = a
a.v = c
a.q = b
a.w = b
a.u = j
a.y = n
j.t = c
j.s = c
j.p = m
j.v = m
j.y = b
j.q = d
j.w = e
j.o = n
m.x = b
m.q = c
m.o = n
m.v = n
m.r = a
m.t = g
k.x = a
k.p = m
k.s = m
k.t = e
k.y = b
d.x = a
d.p = m
d.s = m
d.t = k
d.y = b
assert b.y.o.o.w.t.p.t.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.s: H = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.x: A = None
        self.w: A = None
        self.r: B = None
        self.o: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: A = None
        self.u: G = None
        self.y: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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