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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.z: D = None
        self.v: H = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.q: B = None
        self.y: E = None
        self.o: C = None
        self.z: D = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: D = None
        self.z: D = None
        self.w: I = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.p: B = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.z: D = None
        self.v: H = None
        self.y: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.q: B = None
        self.y: E = None
        self.o: C = None
        self.z: D = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: D = None
        self.z: D = None
        self.w: I = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: H = None
        self.p: B = None
        self.r: D = None
        self.t: D = None
        self.txt = txt

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

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