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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.r: D = None
        self.p: F = None
        self.u: I = None
        self.v: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: C = None
        self.x: H = None
        self.r: E = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: I = None
        self.v: C = None
        self.p: B = None
        self.w: I = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.w: E = None
        self.p: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: D = None
        self.r: D = None
        self.p: F = None
        self.u: I = None
        self.v: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: C = None
        self.x: H = None
        self.r: E = None
        self.y: G = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: I = None
        self.v: C = None
        self.p: B = None
        self.w: I = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.w: E = None
        self.p: F = None
        self.txt = txt

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

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

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