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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.z: C = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.v: H = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: A = None
        self.u: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.z: C = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.v: H = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: A = None
        self.u: C = None
        self.z: H = None
        self.txt = txt

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

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

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

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