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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.o: D = None
        self.w: E = None
        self.q: D = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.o: D = None
        self.w: E = None
        self.q: D = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: C = None
        self.p: E = None
        self.txt = txt

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

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

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