class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.y: D = None
        self.v: C = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.u: F = None
        self.y: A = None
        self.w: A = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.s: A = None
        self.p: E = None
        self.x: E = None
        self.v: B = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.s: G = None
        self.p: C = None
        self.v: E = None
        self.w: G = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.w: G = None
        self.z: B = None
        self.p: C = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: C = None
        self.u: F = None
        self.y: A = None
        self.w: A = None
        self.t: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: A = None
        self.s: A = None
        self.p: E = None
        self.x: E = None
        self.v: B = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: G = None
        self.s: G = None
        self.p: C = None
        self.v: E = None
        self.w: G = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: E = None
        self.w: G = None
        self.z: B = None
        self.p: C = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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

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