class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: G = None
        self.x: G = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.t: G = None
        self.z: E = None
        self.y: G = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.x: F = None
        self.y: B = None
        self.z: A = None
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: G = None
        self.x: G = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.t: G = None
        self.z: E = None
        self.y: G = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: A = None
        self.x: F = None
        self.y: B = None
        self.z: A = None
        self.v: E = None
        self.txt = txt

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

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