class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: D = None
        self.o: A = None
        self.t: F = None
        self.u: C = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: A = None
        self.y: H = None
        self.r: E = None
        self.q: A = None
        self.s: B = None
        self.o: C = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.z: B = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.o: C = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

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

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

c = A("c")
b = B("b")
g = C("g")
e = D("e")
a = E("a")
d = F("d")
i = G("i")
j = H("j")
l = G("l")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: D = None
        self.o: A = None
        self.t: F = None
        self.u: C = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: A = None
        self.y: H = None
        self.r: E = None
        self.q: A = None
        self.s: B = None
        self.o: C = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.z: B = None
        self.q: H = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: D = None
        self.o: C = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

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

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

c = A("c")
b = B("b")
g = C("g")
e = D("e")
a = E("a")
d = F("d")
i = G("i")
j = H("j")
l = G("l")
k = F("k")

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