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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: G = None
        self.s: C = None
        self.w: G = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: G = None
        self.s: C = None
        self.w: G = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.txt = txt

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

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