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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

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

a = A("a")
m = B("m")
h = C("h")
l = D("l")
k = E("k")
j = F("j")
b = G("b")
i = E("i")

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

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

a = A("a")
m = B("m")
h = C("h")
l = D("l")
k = E("k")
j = F("j")
b = G("b")
i = E("i")

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