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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.z: E = None
        self.t: F = None
        self.p: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.o: C = None
        self.z: E = None
        self.q: E = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: G = None
        self.z: E = None
        self.t: F = None
        self.p: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: F = None
        self.o: C = None
        self.z: E = None
        self.q: E = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.z: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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