class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.o: I = None
        self.r: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.u: G = None
        self.r: D = None
        self.t: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: F = None
        self.u: G = None
        self.r: D = None
        self.t: A = None
        self.p: A = None
        self.txt = txt

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

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

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