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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: A = None
        self.p: C = None
        self.v: D = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: I = None
        self.s: I = None
        self.z: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: I = None
        self.q: C = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.r: C = None
        self.x: A = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: A = None
        self.p: C = None
        self.v: D = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: I = None
        self.s: I = None
        self.z: I = None
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: I = None
        self.q: C = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.r: C = None
        self.x: A = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

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