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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.z: E = None
        self.v: A = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: I = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: C = None
        self.z: E = None
        self.v: A = None
        self.r: C = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: I = None
        self.p: B = None
        self.txt = txt

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

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

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