class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: C = None
        self.s: D = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: E = None
        self.z: D = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: E = None
        self.z: D = None
        self.x: C = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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