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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: I = None
        self.t: A = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.w: E = None
        self.x: I = None
        self.q: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: A = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: I = None
        self.t: A = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.w: E = None
        self.x: I = None
        self.q: G = None
        self.o: A = None
        self.txt = txt

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

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

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