class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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