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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.t: G = None
        self.u: C = None
        self.txt = txt

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

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

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

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