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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: G = None
        self.t: J = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.w: F = None
        self.v: D = None
        self.u: F = None
        self.t: C = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: G = None
        self.t: J = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.w: F = None
        self.v: D = None
        self.u: F = None
        self.t: C = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: A = None
        self.txt = txt

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

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

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