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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: A = None
        self.w: A = None
        self.p: C = None
        self.r: E = None
        self.o: D = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

k = A("k")
a = B("a")
h = C("h")
j = D("j")
n = E("n")
l = F("l")
b = G("b")
d = E("d")
m = D("m")
i = A("i")

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.y: G = None
        self.q: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: A = None
        self.w: A = None
        self.p: C = None
        self.r: E = None
        self.o: D = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

k = A("k")
a = B("a")
h = C("h")
j = D("j")
n = E("n")
l = F("l")
b = G("b")
d = E("d")
m = D("m")
i = A("i")

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