class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.r: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.y: E = None
        self.t: B = None
        self.o: I = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.o: G = None
        self.q: H = None
        self.u: H = None
        self.s: I = None
        self.z: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.y: E = None
        self.t: B = None
        self.o: I = None
        self.x: I = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.o: G = None
        self.q: H = None
        self.u: H = None
        self.s: I = None
        self.z: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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