class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: D = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.x: A = None
        self.u: F = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: G = None
        self.y: A = None
        self.s: H = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.x: F = None
        self.p: D = None
        self.r: G = None
        self.q: I = None
        self.y: F = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

l = A("l")
f = B("f")
j = C("j")
h = D("h")
e = E("e")
m = F("m")
k = G("k")
c = H("c")
a = I("a")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: J = None
        self.q: D = None
        self.x: A = None
        self.u: F = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: G = None
        self.y: A = None
        self.s: H = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.x: F = None
        self.p: D = None
        self.r: G = None
        self.q: I = None
        self.y: F = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

l = A("l")
f = B("f")
j = C("j")
h = D("h")
e = E("e")
m = F("m")
k = G("k")
c = H("c")
a = I("a")
d = J("d")

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