class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.x: B = None
        self.s: D = None
        self.t: D = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.x: B = None
        self.s: D = None
        self.t: D = None
        self.o: G = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: A = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

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

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

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