class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: G = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: E = None
        self.y: D = None
        self.t: A = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: E = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: E = None
        self.y: D = None
        self.t: A = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: E = None
        self.p: F = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.txt = txt

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

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