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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.x: E = None
        self.u: J = None
        self.p: H = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.v: E = None
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: J = None
        self.o: A = None
        self.t: A = None
        self.q: G = None
        self.w: D = None
        self.x: G = None
        self.z: D = None
        self.r: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: G = None
        self.o: E = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: E = None
        self.x: E = None
        self.u: J = None
        self.p: H = None
        self.y: E = None
        self.s: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: C = None
        self.p: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.v: E = None
        self.r: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: J = None
        self.o: A = None
        self.t: A = None
        self.q: G = None
        self.w: D = None
        self.x: G = None
        self.z: D = None
        self.r: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: G = None
        self.o: E = None
        self.r: C = None
        self.txt = txt

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

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

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