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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.y: G = None
        self.r: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.z: C = None
        self.s: C = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.y: G = None
        self.r: C = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: D = None
        self.z: C = None
        self.s: C = None
        self.w: B = None
        self.t: D = None
        self.txt = txt

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

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

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