class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.y: H = None
        self.w: E = None
        self.t: G = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: H = None
        self.r: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.p: H = None
        self.r: G = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.o: G = None
        self.r: A = None
        self.t: D = None
        self.txt = txt

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

l.q = b
l.s = d
l.t = d
l.y = j
l.x = j
l.w = h
f.o = d
f.y = j
f.r = a
a.v = j
a.z = b
b.y = l
b.s = a
b.v = i
b.o = h
h.v = b
n.q = h
n.z = i
n.w = i
n.p = j
n.r = d
n.t = b
d.w = k
j.x = a
k.w = f
k.y = l
k.r = l
k.o = d
k.t = b
i.q = h
i.z = n
i.w = n
i.p = j
i.r = d
i.t = b
assert a.z.y.w.v.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: G = None
        self.y: H = None
        self.w: E = None
        self.t: G = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: H = None
        self.r: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: F = None
        self.p: H = None
        self.r: G = None
        self.w: F = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.o: G = None
        self.r: A = None
        self.t: D = None
        self.txt = txt

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

l.q = b
l.s = d
l.t = d
l.y = j
l.x = j
l.w = h
f.o = d
f.y = j
f.r = a
a.v = j
a.z = b
b.y = l
b.s = a
b.v = i
b.o = h
h.v = b
n.q = h
n.z = i
n.w = i
n.p = j
n.r = d
n.t = b
d.w = k
j.x = a
k.w = f
k.y = l
k.r = l
k.o = d
k.t = b
i.q = h
i.z = n
i.w = n
i.p = j
i.r = d
i.t = b
assert a.z.y.w.v.o.v.txt == "b"