class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: D = None
        self.y: F = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.y: G = None
        self.o: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: G = None
        self.y: G = None
        self.o: A = None
        self.r: F = None
        self.txt = txt

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

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

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