class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.r: E = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

h = A("h")
g = B("g")
m = C("m")
i = D("i")
e = E("e")
k = F("k")
d = G("d")
j = C("j")

h.u = i
g.p = e
m.s = h
m.w = h
m.t = e
m.v = j
m.q = j
m.u = k
m.p = d
i.o = e
i.y = e
i.v = h
i.t = h
i.p = g
i.s = k
e.s = k
e.u = i
k.q = h
d.u = e
d.r = e
d.z = e
d.t = h
d.q = i
j.s = h
j.w = h
j.t = e
j.v = m
j.q = m
j.u = k
j.p = d
assert g.p.s.q.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.r: E = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

h = A("h")
g = B("g")
m = C("m")
i = D("i")
e = E("e")
k = F("k")
d = G("d")
j = C("j")

h.u = i
g.p = e
m.s = h
m.w = h
m.t = e
m.v = j
m.q = j
m.u = k
m.p = d
i.o = e
i.y = e
i.v = h
i.t = h
i.p = g
i.s = k
e.s = k
e.u = i
k.q = h
d.u = e
d.r = e
d.z = e
d.t = h
d.q = i
j.s = h
j.w = h
j.t = e
j.v = m
j.q = m
j.u = k
j.p = d
assert g.p.s.q.u.o.txt == "e"