class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: B = None
        self.y: H = None
        self.p: F = None
        self.z: G = None
        self.t: G = None
        self.s: I = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.o: I = None
        self.y: D = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: F = None
        self.t: G = None
        self.v: A = None
        self.r: F = None
        self.y: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: A = None
        self.o: I = None
        self.y: D = None
        self.t: H = None
        self.v: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: F = None
        self.t: G = None
        self.v: A = None
        self.r: F = None
        self.y: A = None
        self.txt = txt

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

g.q = j
g.w = l
g.y = f
g.p = c
g.z = k
g.t = k
g.s = i
g.v = i
l.x = g
l.p = g
l.o = i
l.y = j
l.t = f
l.v = f
n.t = g
n.s = c
n.w = c
n.q = l
n.y = f
n.u = f
n.z = i
n.v = k
j.x = l
j.s = d
j.p = f
j.y = f
j.q = k
j.r = i
j.w = c
j.t = c
j.v = g
d.r = c
c.q = i
c.s = d
k.q = f
k.y = j
f.y = c
i.u = j
i.x = c
i.r = c
i.t = k
i.v = g
i.y = g
assert k.q.y.s.r.s.r.q.v.p.txt == "c"