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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.z: A = None
        self.u: A = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: A = None
        self.z: A = None
        self.u: A = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.t: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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