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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.o: B = None
        self.v: G = None
        self.w: G = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.v: D = None
        self.u: G = None
        self.o: E = None
        self.txt = txt

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

i = A("i")
d = B("d")
m = C("m")
n = D("n")
f = E("f")
l = F("l")
g = G("g")
k = B("k")
h = E("h")
c = B("c")

i.s = n
i.o = n
i.u = c
i.q = h
i.w = m
i.p = k
i.t = k
d.s = f
m.t = d
m.w = i
m.q = h
m.x = n
m.o = n
n.q = h
n.x = h
n.o = h
n.y = i
f.p = k
f.u = g
f.v = g
f.w = g
f.o = d
f.y = h
f.s = h
l.x = n
l.v = n
l.q = f
l.u = g
l.o = h
g.q = m
g.u = f
g.p = i
k.s = h
h.p = d
h.u = g
h.v = g
h.w = g
h.o = k
h.y = f
h.s = f
c.s = h
assert g.u.p.s.u.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: B = None
        self.o: D = None
        self.q: E = None
        self.w: C = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: G = None
        self.o: B = None
        self.v: G = None
        self.w: G = None
        self.y: E = None
        self.s: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.q: E = None
        self.v: D = None
        self.u: G = None
        self.o: E = None
        self.txt = txt

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

i = A("i")
d = B("d")
m = C("m")
n = D("n")
f = E("f")
l = F("l")
g = G("g")
k = B("k")
h = E("h")
c = B("c")

i.s = n
i.o = n
i.u = c
i.q = h
i.w = m
i.p = k
i.t = k
d.s = f
m.t = d
m.w = i
m.q = h
m.x = n
m.o = n
n.q = h
n.x = h
n.o = h
n.y = i
f.p = k
f.u = g
f.v = g
f.w = g
f.o = d
f.y = h
f.s = h
l.x = n
l.v = n
l.q = f
l.u = g
l.o = h
g.q = m
g.u = f
g.p = i
k.s = h
h.p = d
h.u = g
h.v = g
h.w = g
h.o = k
h.y = f
h.s = f
c.s = h
assert g.u.p.s.u.p.txt == "i"