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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.q: B = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.q: D = None
        self.x: A = None
        self.o: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: G = None
        self.q: B = None
        self.x: F = None
        self.z: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.q: D = None
        self.x: A = None
        self.o: C = None
        self.z: A = None
        self.txt = txt

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

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