class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: I = None
        self.p: I = None
        self.u: C = None
        self.x: E = None
        self.t: I = None
        self.v: H = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: I = None
        self.w: I = None
        self.z: A = None
        self.y: H = None
        self.s: H = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.txt = txt

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

c = A("c")
h = B("h")
a = C("a")
k = D("k")
d = E("d")
g = F("g")
b = G("b")
j = H("j")
m = I("m")
e = A("e")

c.r = j
c.v = j
c.y = m
c.p = m
c.t = m
c.u = a
c.x = d
c.w = e
c.s = g
h.r = j
h.y = j
h.s = j
h.v = m
h.w = m
h.z = c
h.q = e
a.s = h
a.x = m
k.q = g
k.x = h
d.p = k
d.z = a
g.y = d
g.w = h
b.s = j
b.u = g
b.v = g
j.v = a
j.p = c
m.t = j
m.u = j
m.z = g
m.x = g
m.y = d
m.q = c
m.v = c
m.o = k
e.r = j
e.v = j
e.y = m
e.p = m
e.t = m
e.u = a
e.x = d
e.w = c
e.s = g
assert g.y.z.s.z.w.t.x.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: I = None
        self.p: I = None
        self.u: C = None
        self.x: E = None
        self.t: I = None
        self.v: H = None
        self.w: A = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: I = None
        self.w: I = None
        self.z: A = None
        self.y: H = None
        self.s: H = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: A = None
        self.txt = txt

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

c = A("c")
h = B("h")
a = C("a")
k = D("k")
d = E("d")
g = F("g")
b = G("b")
j = H("j")
m = I("m")
e = A("e")

c.r = j
c.v = j
c.y = m
c.p = m
c.t = m
c.u = a
c.x = d
c.w = e
c.s = g
h.r = j
h.y = j
h.s = j
h.v = m
h.w = m
h.z = c
h.q = e
a.s = h
a.x = m
k.q = g
k.x = h
d.p = k
d.z = a
g.y = d
g.w = h
b.s = j
b.u = g
b.v = g
j.v = a
j.p = c
m.t = j
m.u = j
m.z = g
m.x = g
m.y = d
m.q = c
m.v = c
m.o = k
e.r = j
e.v = j
e.y = m
e.p = m
e.t = m
e.u = a
e.x = d
e.w = c
e.s = g
assert g.y.z.s.z.w.t.x.y.p.txt == "k"