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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.p: F = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

h = A("h")
g = B("g")
i = C("i")
j = D("j")
m = E("m")
k = F("k")
c = E("c")

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.p: F = None
        self.s: D = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

h = A("h")
g = B("g")
i = C("i")
j = D("j")
m = E("m")
k = F("k")
c = E("c")

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