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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.y: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.o: G = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.o: F = None
        self.w: D = None
        self.p: D = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: E = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: G = None
        self.y: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.o: G = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.o: F = None
        self.w: D = None
        self.p: D = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

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

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