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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: B = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: G = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: B = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

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

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