class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: D = None
        self.z: C = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: B = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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