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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.t: B = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: D = None
        self.t: B = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.u: B = None
        self.o: D = None
        self.txt = txt

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

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