class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.t: I = None
        self.r: H = None
        self.q: D = None
        self.v: H = None
        self.p: H = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: F = None
        self.t: I = None
        self.r: H = None
        self.w: C = None
        self.o: D = None
        self.x: D = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: E = None
        self.x: F = None
        self.p: F = None
        self.y: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.z: A = None
        self.p: D = None
        self.u: E = None
        self.o: F = None
        self.x: E = None
        self.v: B = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.p: H = None
        self.s: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.t: I = None
        self.r: H = None
        self.q: D = None
        self.v: H = None
        self.p: H = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: F = None
        self.t: I = None
        self.r: H = None
        self.w: C = None
        self.o: D = None
        self.x: D = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: E = None
        self.x: F = None
        self.p: F = None
        self.y: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: E = None
        self.z: A = None
        self.p: D = None
        self.u: E = None
        self.o: F = None
        self.x: E = None
        self.v: B = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.p: H = None
        self.s: G = None
        self.txt = txt

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

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