class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: B = None
        self.v: E = None
        self.w: D = None
        self.u: G = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: A = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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