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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.u: A = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.p: H = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: E = None
        self.s: E = None
        self.u: C = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: I = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: E = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.u: A = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.p: H = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: E = None
        self.s: E = None
        self.u: C = None
        self.o: G = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: I = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.u: E = None
        self.txt = txt

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

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