class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.q: B = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.u: B = None
        self.y: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: B = None
        self.q: B = None
        self.x: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.u: B = None
        self.y: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: B = None
        self.q: B = None
        self.x: I = None
        self.txt = txt

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

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

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