class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: B = None
        self.x: G = None
        self.u: B = None
        self.p: G = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: E = None
        self.z: D = None
        self.x: B = None
        self.s: D = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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

k = A("k")
h = B("h")
f = C("f")
c = D("c")
d = E("d")
e = F("e")
m = G("m")
g = A("g")
l = F("l")
a = D("a")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: E = None
        self.z: D = None
        self.x: B = None
        self.s: D = None
        self.v: C = None
        self.r: D = None
        self.txt = txt

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

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

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

k = A("k")
h = B("h")
f = C("f")
c = D("c")
d = E("d")
e = F("e")
m = G("m")
g = A("g")
l = F("l")
a = D("a")

k.r = d
k.o = h
k.u = h
k.s = h
k.x = m
k.p = m
h.u = l
h.s = e
f.o = l
f.t = g
f.x = m
c.t = f
c.v = f
c.u = d
c.z = a
c.s = a
c.r = a
c.x = h
d.t = c
e.v = h
e.r = h
e.y = d
e.o = k
e.w = l
e.z = c
m.u = h
m.v = c
g.r = d
g.o = h
g.u = h
g.s = h
g.x = m
g.p = m
l.v = h
l.r = h
l.y = d
l.o = g
l.w = e
l.z = c
a.t = f
a.v = f
a.u = d
a.z = c
a.s = c
a.r = c
a.x = h
assert m.u.s.w.v.txt == "h"