class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: G = None
        self.t: F = None
        self.x: E = None
        self.y: F = None
        self.p: H = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: B = None
        self.t: B = None
        self.s: G = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: C = None
        self.t: I = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: B = None
        self.t: B = None
        self.s: G = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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