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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: B = None
        self.q: H = None
        self.s: A = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: B = None
        self.q: H = None
        self.s: A = None
        self.y: B = None
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.txt = txt

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

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

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