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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.q: D = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.t: A = None
        self.v: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: D = None
        self.q: D = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.p: F = None
        self.t: A = None
        self.v: F = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.y: D = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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