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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.s: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

h = A("h")
e = B("e")
i = C("i")
f = D("f")
c = E("c")
j = F("j")
a = G("a")
g = C("g")
k = E("k")

h.x = a
h.r = g
h.p = k
h.u = j
e.t = j
e.w = g
e.s = c
e.p = k
i.z = f
i.o = a
i.v = c
i.q = g
f.r = e
f.q = h
f.v = h
f.s = a
f.z = a
c.r = e
c.q = e
c.x = a
c.s = h
j.o = e
j.w = a
a.w = f
a.r = h
a.z = j
a.v = e
a.t = e
g.z = f
g.o = a
g.v = c
g.q = i
k.r = e
k.q = e
k.x = a
k.s = h
assert c.x.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: C = None
        self.p: E = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: C = None
        self.s: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

h = A("h")
e = B("e")
i = C("i")
f = D("f")
c = E("c")
j = F("j")
a = G("a")
g = C("g")
k = E("k")

h.x = a
h.r = g
h.p = k
h.u = j
e.t = j
e.w = g
e.s = c
e.p = k
i.z = f
i.o = a
i.v = c
i.q = g
f.r = e
f.q = h
f.v = h
f.s = a
f.z = a
c.r = e
c.q = e
c.x = a
c.s = h
j.o = e
j.w = a
a.w = f
a.r = h
a.z = j
a.v = e
a.t = e
g.z = f
g.o = a
g.v = c
g.q = i
k.r = e
k.q = e
k.x = a
k.s = h
assert c.x.z.o.txt == "e"