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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: E = None
        self.r: G = None
        self.y: A = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.q: B = None
        self.p: E = None
        self.r: F = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

d.o = l
d.q = i
d.w = g
d.y = h
e.x = h
e.s = g
e.q = i
h.z = i
h.r = i
h.q = f
h.y = d
h.x = k
h.s = c
g.x = e
g.q = e
g.z = h
g.p = f
g.r = a
g.t = d
g.s = d
c.x = l
c.w = e
c.r = d
l.t = d
l.y = d
l.p = i
l.v = i
l.s = e
i.x = h
f.x = a
f.w = e
f.r = d
a.t = d
a.y = d
a.p = i
a.v = i
a.s = e
k.x = e
k.q = e
k.z = h
k.p = c
k.r = l
k.t = d
k.s = d
assert g.x.x.q.r.o.s.s.r.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: G = None
        self.w: D = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: E = None
        self.r: G = None
        self.y: A = None
        self.x: D = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.q: B = None
        self.p: E = None
        self.r: F = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

d.o = l
d.q = i
d.w = g
d.y = h
e.x = h
e.s = g
e.q = i
h.z = i
h.r = i
h.q = f
h.y = d
h.x = k
h.s = c
g.x = e
g.q = e
g.z = h
g.p = f
g.r = a
g.t = d
g.s = d
c.x = l
c.w = e
c.r = d
l.t = d
l.y = d
l.p = i
l.v = i
l.s = e
i.x = h
f.x = a
f.w = e
f.r = d
a.t = d
a.y = d
a.p = i
a.v = i
a.s = e
k.x = e
k.q = e
k.z = h
k.p = c
k.r = l
k.t = d
k.s = d
assert g.x.x.q.r.o.s.s.r.y.w.txt == "g"