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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.o: B = None
        self.r: B = None
        self.q: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: D = None
        self.o: B = None
        self.r: B = None
        self.q: F = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.o: F = None
        self.txt = txt

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

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