class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.p: D = None
        self.x: F = None
        self.w: I = None
        self.v: B = None
        self.z: F = None
        self.r: B = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.p: F = None
        self.z: C = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.z: C = None
        self.o: D = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.p: D = None
        self.x: F = None
        self.w: I = None
        self.v: B = None
        self.z: F = None
        self.r: B = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.p: F = None
        self.z: C = None
        self.t: C = None
        self.u: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.v: H = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: E = None
        self.z: C = None
        self.o: D = None
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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