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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.o: B = None
        self.t: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.y: I = None
        self.r: C = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.x: B = None
        self.o: H = None
        self.p: G = None
        self.w: C = None
        self.y: E = None
        self.u: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: C = None
        self.o: B = None
        self.t: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: A = None
        self.y: I = None
        self.r: C = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: D = None
        self.x: B = None
        self.o: H = None
        self.p: G = None
        self.w: C = None
        self.y: E = None
        self.u: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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