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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.o: F = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: G = None
        self.o: C = None
        self.r: C = None
        self.p: E = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.o: F = None
        self.v: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: G = None
        self.o: C = None
        self.r: C = None
        self.p: E = None
        self.v: F = None
        self.q: B = None
        self.txt = txt

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

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