class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.w: H = None
        self.y: D = None
        self.q: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.o: A = None
        self.y: H = None
        self.r: H = None
        self.w: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: A = None
        self.o: A = None
        self.y: H = None
        self.r: H = None
        self.w: G = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: H = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: F = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

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

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