class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.w: E = None
        self.z: G = None
        self.t: G = None
        self.x: E = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

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

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