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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.z: D = None
        self.t: C = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.v: E = None
        self.u: E = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

g = A("g")
n = B("n")
d = C("d")
j = D("j")
i = E("i")
e = F("e")
l = G("l")
f = H("f")
b = A("b")
m = D("m")

g.s = f
g.t = l
n.o = i
n.w = i
n.y = f
n.z = m
n.t = d
n.u = g
d.r = e
d.w = g
d.v = i
d.u = i
d.x = m
d.p = f
j.t = i
j.z = f
j.u = l
j.p = l
j.x = m
i.t = f
i.w = f
i.x = l
i.s = l
i.r = j
i.o = n
i.z = e
i.y = e
e.x = b
l.q = e
f.q = d
f.p = i
f.t = i
b.s = f
b.t = l
m.t = i
m.z = f
m.u = l
m.p = l
m.x = j
assert d.u.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.z: D = None
        self.t: C = None
        self.u: A = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.v: E = None
        self.u: E = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

g = A("g")
n = B("n")
d = C("d")
j = D("j")
i = E("i")
e = F("e")
l = G("l")
f = H("f")
b = A("b")
m = D("m")

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