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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.y: J = None
        self.t: I = None
        self.v: F = None
        self.w: J = None
        self.r: B = None
        self.u: C = None
        self.q: I = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: I = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.u: B = None
        self.s: C = None
        self.t: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: A = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.txt = txt

f = A("f")
j = B("j")
c = C("c")
l = D("l")
n = E("n")
a = F("a")
e = G("e")
i = H("i")
g = I("g")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: G = None
        self.y: J = None
        self.t: I = None
        self.v: F = None
        self.w: J = None
        self.r: B = None
        self.u: C = None
        self.q: I = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: I = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: D = None
        self.u: B = None
        self.s: C = None
        self.t: C = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: A = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.txt = txt

f = A("f")
j = B("j")
c = C("c")
l = D("l")
n = E("n")
a = F("a")
e = G("e")
i = H("i")
g = I("g")
m = J("m")

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