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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: H = None
        self.s: G = None
        self.z: A = None
        self.w: E = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: F = None
        self.o: J = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: H = None
        self.s: G = None
        self.z: A = None
        self.w: E = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: F = None
        self.o: J = None
        self.s: D = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.z: D = None
        self.txt = txt

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

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