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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: H = None
        self.u: B = None
        self.z: B = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.o: H = None
        self.r: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

l = A("l")
f = B("f")
i = C("i")
e = D("e")
b = E("b")
j = F("j")
n = G("n")
h = H("h")
d = I("d")
m = J("m")

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: H = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: H = None
        self.u: B = None
        self.z: B = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.o: H = None
        self.r: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

l = A("l")
f = B("f")
i = C("i")
e = D("e")
b = E("b")
j = F("j")
n = G("n")
h = H("h")
d = I("d")
m = J("m")

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