class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: F = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.w: H = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.p: B = None
        self.w: E = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.u: A = None
        self.w: D = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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

h.p = l
h.t = l
h.z = c
i.y = h
j.s = m
j.r = n
j.x = i
k.t = e
m.q = k
m.z = k
m.w = e
m.y = l
m.p = i
l.s = k
l.x = k
l.p = i
l.y = i
l.w = m
l.r = c
c.x = i
c.z = i
c.u = h
c.w = k
c.y = l
c.t = l
e.u = n
e.y = l
e.p = k
n.s = m
n.r = j
n.x = i
assert k.t.p.t.u.r.x.y.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: F = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.w: H = None
        self.y: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.p: B = None
        self.w: E = None
        self.r: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: B = None
        self.u: A = None
        self.w: D = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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

h.p = l
h.t = l
h.z = c
i.y = h
j.s = m
j.r = n
j.x = i
k.t = e
m.q = k
m.z = k
m.w = e
m.y = l
m.p = i
l.s = k
l.x = k
l.p = i
l.y = i
l.w = m
l.r = c
c.x = i
c.z = i
c.u = h
c.w = k
c.y = l
c.t = l
e.u = n
e.y = l
e.p = k
n.s = m
n.r = j
n.x = i
assert k.t.p.t.u.r.x.y.t.y.txt == "i"