class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: E = None
        self.z: B = None
        self.p: C = None
        self.u: H = None
        self.o: G = None
        self.w: C = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: A = None
        self.q: C = None
        self.x: E = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: H = None
        self.r: F = None
        self.w: D = None
        self.y: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: A = None
        self.q: C = None
        self.x: E = None
        self.u: E = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: H = None
        self.r: F = None
        self.w: D = None
        self.y: A = None
        self.txt = txt

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

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

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