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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.w: B = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: F = None
        self.w: B = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: D = None
        self.txt = txt

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

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