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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: I = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.y: A = None
        self.s: I = None
        self.t: C = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: F = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.q: H = None
        self.o: H = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.q: I = None
        self.x: I = None
        self.r: I = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.q: D = None
        self.t: F = None
        self.r: A = None
        self.s: G = None
        self.y: G = None
        self.x: B = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: I = None
        self.y: G = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.y: A = None
        self.s: I = None
        self.t: C = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: F = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: G = None
        self.q: H = None
        self.o: H = None
        self.y: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.q: I = None
        self.x: I = None
        self.r: I = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: D = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.q: D = None
        self.t: F = None
        self.r: A = None
        self.s: G = None
        self.y: G = None
        self.x: B = None
        self.p: C = None
        self.txt = txt

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

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