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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: E = None
        self.w: D = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: B = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: F = None
        self.s: E = None
        self.z: E = None
        self.x: B = None
        self.txt = txt

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

e = A("e")
j = B("j")
h = C("h")
c = D("c")
m = E("m")
a = F("a")
g = E("g")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: E = None
        self.w: D = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: B = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: F = None
        self.s: E = None
        self.z: E = None
        self.x: B = None
        self.txt = txt

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

e = A("e")
j = B("j")
h = C("h")
c = D("c")
m = E("m")
a = F("a")
g = E("g")

e.t = j
e.v = m
e.r = a
j.z = h
j.p = m
j.v = m
j.w = c
j.o = a
h.o = g
c.x = e
c.q = e
c.r = j
c.o = h
m.v = a
m.y = a
m.s = g
m.z = g
m.x = j
a.p = h
g.v = a
g.y = a
g.s = m
g.z = m
g.x = j
assert m.x.v.s.y.txt == "a"