class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: D = None
        self.y: E = None
        self.x: D = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.t: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.p: D = None
        self.r: D = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.y: H = None
        self.w: H = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.t: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: E = None
        self.p: D = None
        self.r: D = None
        self.x: G = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.y: H = None
        self.w: H = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: F = None
        self.u: C = None
        self.txt = txt

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

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

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