class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.q: H = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: J = None
        self.x: H = None
        self.r: E = None
        self.txt = txt

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

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

k.t = e
e.u = m
e.p = j
a.u = i
a.o = m
a.v = j
h.v = f
h.q = f
h.u = n
h.y = a
n.p = k
n.t = f
j.u = a
j.o = h
m.o = e
m.y = e
f.t = c
f.x = n
f.o = j
i.q = h
i.p = c
i.x = f
i.r = n
c.s = m
c.y = e
c.q = h
c.x = h
c.o = k
c.v = k
c.u = n
c.p = n
assert i.q.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: G = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.q: H = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: E = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: J = None
        self.x: H = None
        self.r: E = None
        self.txt = txt

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

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

k.t = e
e.u = m
e.p = j
a.u = i
a.o = m
a.v = j
h.v = f
h.q = f
h.u = n
h.y = a
n.p = k
n.t = f
j.u = a
j.o = h
m.o = e
m.y = e
f.t = c
f.x = n
f.o = j
i.q = h
i.p = c
i.x = f
i.r = n
c.s = m
c.y = e
c.q = h
c.x = h
c.o = k
c.v = k
c.u = n
c.p = n
assert i.q.u.t.txt == "f"