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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

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

m.s = a
m.o = l
l.u = g
l.t = e
l.o = e
d.s = m
d.w = m
e.o = d
e.x = l
g.t = m
g.p = a
g.y = j
h.u = l
h.y = l
h.x = l
h.s = e
h.p = d
a.s = m
a.o = l
j.u = l
j.y = l
j.x = l
j.s = e
j.p = d
assert e.o.s.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: D = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

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

m.s = a
m.o = l
l.u = g
l.t = e
l.o = e
d.s = m
d.w = m
e.o = d
e.x = l
g.t = m
g.p = a
g.y = j
h.u = l
h.y = l
h.x = l
h.s = e
h.p = d
a.s = m
a.o = l
j.u = l
j.y = l
j.x = l
j.s = e
j.p = d
assert e.o.s.o.u.txt == "g"