class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.v: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.z: E = None
        self.w: D = None
        self.s: B = None
        self.q: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.z: E = None
        self.w: D = None
        self.s: B = None
        self.q: H = None
        self.r: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.txt = txt

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

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

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