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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.u: E = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: C = None
        self.u: E = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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