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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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