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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.x: H = None
        self.o: B = None
        self.z: A = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.x: H = None
        self.o: B = None
        self.z: A = None
        self.p: A = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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