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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.w: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: F = None
        self.w: B = None
        self.r: G = None
        self.txt = txt

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

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

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

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