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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.z: I = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: D = None
        self.y: F = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: F = None
        self.z: I = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: D = None
        self.y: F = None
        self.q: D = None
        self.txt = txt

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

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

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