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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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