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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.u: F = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.t: H = None
        self.w: D = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.r: A = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: I = None
        self.u: F = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: C = None
        self.t: H = None
        self.w: D = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.r: A = None
        self.x: B = None
        self.o: I = None
        self.txt = txt

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

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

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

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