class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: H = None
        self.x: G = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: F = None
        self.t: H = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: D = None
        self.y: D = None
        self.u: H = None
        self.p: H = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.r: E = None
        self.v: G = None
        self.y: C = None
        self.s: A = None
        self.w: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.p: F = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.txt = txt

g = A("g")
c = B("c")
b = C("b")
h = D("h")
j = E("j")
a = F("a")
m = G("m")
k = H("k")

g.y = c
g.o = a
c.o = k
c.w = k
c.z = k
c.x = m
c.y = h
b.y = h
b.r = h
b.p = g
b.o = g
h.v = c
h.q = a
h.t = k
h.u = k
h.p = m
j.t = m
j.v = h
j.y = h
j.u = k
j.p = k
j.s = b
a.z = h
a.u = j
a.r = j
a.w = j
a.v = m
a.y = b
a.s = g
a.q = k
m.z = a
m.p = a
m.x = h
m.t = k
m.y = g
k.v = g
k.t = g
assert a.s.y.y.v.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: H = None
        self.x: G = None
        self.y: D = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: A = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: F = None
        self.t: H = None
        self.p: G = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: D = None
        self.y: D = None
        self.u: H = None
        self.p: H = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: E = None
        self.r: E = None
        self.v: G = None
        self.y: C = None
        self.s: A = None
        self.w: E = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.p: F = None
        self.t: H = None
        self.y: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.txt = txt

g = A("g")
c = B("c")
b = C("b")
h = D("h")
j = E("j")
a = F("a")
m = G("m")
k = H("k")

g.y = c
g.o = a
c.o = k
c.w = k
c.z = k
c.x = m
c.y = h
b.y = h
b.r = h
b.p = g
b.o = g
h.v = c
h.q = a
h.t = k
h.u = k
h.p = m
j.t = m
j.v = h
j.y = h
j.u = k
j.p = k
j.s = b
a.z = h
a.u = j
a.r = j
a.w = j
a.v = m
a.y = b
a.s = g
a.q = k
m.z = a
m.p = a
m.x = h
m.t = k
m.y = g
k.v = g
k.t = g
assert a.s.y.y.v.y.q.txt == "a"