class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: D = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.w: H = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: F = None
        self.p: A = None
        self.v: A = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: D = None
        self.w: H = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: F = None
        self.p: A = None
        self.v: A = None
        self.s: D = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

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