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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

l = A("l")
a = B("a")
n = C("n")
f = D("f")
i = E("i")
j = F("j")
m = G("m")
d = H("d")
e = I("e")

l.p = f
l.y = f
l.u = n
l.r = n
l.v = e
l.x = e
l.w = m
l.o = j
a.y = i
n.r = e
n.v = l
f.o = d
f.z = i
f.y = i
f.t = e
f.w = e
f.u = l
f.r = j
i.q = m
i.s = a
j.v = d
j.p = m
j.z = m
m.q = e
d.v = e
d.q = n
e.x = l
e.w = d
e.q = i
assert d.q.v.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: C = None
        self.y: D = None
        self.r: C = None
        self.v: I = None
        self.w: G = None
        self.x: I = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: H = None
        self.q: E = None
        self.txt = txt

l = A("l")
a = B("a")
n = C("n")
f = D("f")
i = E("i")
j = F("j")
m = G("m")
d = H("d")
e = I("e")

l.p = f
l.y = f
l.u = n
l.r = n
l.v = e
l.x = e
l.w = m
l.o = j
a.y = i
n.r = e
n.v = l
f.o = d
f.z = i
f.y = i
f.t = e
f.w = e
f.u = l
f.r = j
i.q = m
i.s = a
j.v = d
j.p = m
j.z = m
m.q = e
d.v = e
d.q = n
e.x = l
e.w = d
e.q = i
assert d.q.v.o.v.txt == "d"