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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.w: D = None
        self.u: E = None
        self.t: H = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: C = None
        self.s: F = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.w: D = None
        self.u: E = None
        self.t: H = None
        self.r: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: C = None
        self.s: F = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: F = None
        self.t: B = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.u: E = None
        self.txt = txt

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

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