class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: I = None
        self.x: B = None
        self.y: E = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.t: G = None
        self.q: E = None
        self.r: D = None
        self.p: H = None
        self.z: E = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.u: I = None
        self.x: B = None
        self.y: E = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.t: G = None
        self.q: E = None
        self.r: D = None
        self.p: H = None
        self.z: E = None
        self.u: G = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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