class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: F = None
        self.v: F = None
        self.r: E = None
        self.t: I = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: E = None
        self.u: I = None
        self.x: A = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.w: I = None
        self.z: A = None
        self.x: I = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: E = None
        self.u: I = None
        self.x: A = None
        self.t: A = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: H = None
        self.w: I = None
        self.z: A = None
        self.x: I = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.txt = txt

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

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

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