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

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

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

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

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

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

m = A("m")
g = B("g")
c = C("c")
e = D("e")
l = E("l")
b = F("b")
h = A("h")
f = F("f")

m.s = e
m.t = l
m.w = g
g.s = l
g.v = m
g.q = f
g.o = e
g.w = e
c.t = b
e.y = g
e.w = c
l.s = c
b.u = f
b.s = g
b.v = g
b.r = m
b.o = m
b.y = l
h.s = e
h.t = l
h.w = g
f.u = b
f.s = g
f.v = g
f.r = m
f.o = m
f.y = l
assert b.o.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

m = A("m")
g = B("g")
c = C("c")
e = D("e")
l = E("l")
b = F("b")
h = A("h")
f = F("f")

m.s = e
m.t = l
m.w = g
g.s = l
g.v = m
g.q = f
g.o = e
g.w = e
c.t = b
e.y = g
e.w = c
l.s = c
b.u = f
b.s = g
b.v = g
b.r = m
b.o = m
b.y = l
h.s = e
h.t = l
h.w = g
f.u = b
f.s = g
f.v = g
f.r = m
f.o = m
f.y = l
assert b.o.t.s.txt == "c"