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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.x: G = None
        self.y: C = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.w: H = None
        self.o: C = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: E = None
        self.x: G = None
        self.y: C = None
        self.r: A = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.w: H = None
        self.o: C = None
        self.q: C = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: E = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

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