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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.p: D = None
        self.s: E = None
        self.txt = txt

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

i.o = f
g.r = m
g.w = e
f.s = j
l.q = g
l.w = f
l.y = e
m.p = h
c.y = m
c.s = m
c.q = g
c.p = l
a.y = m
a.s = m
a.q = g
a.p = l
j.y = m
j.s = m
j.q = g
j.p = h
h.q = g
h.w = f
h.y = e
e.o = f
assert i.o.s.p.w.s.p.y.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: B = None
        self.p: D = None
        self.s: E = None
        self.txt = txt

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

i.o = f
g.r = m
g.w = e
f.s = j
l.q = g
l.w = f
l.y = e
m.p = h
c.y = m
c.s = m
c.q = g
c.p = l
a.y = m
a.s = m
a.q = g
a.p = l
j.y = m
j.s = m
j.q = g
j.p = h
h.q = g
h.w = f
h.y = e
e.o = f
assert i.o.s.p.w.s.p.y.o.s.txt == "j"