class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: H = None
        self.r: G = None
        self.u: F = None
        self.q: B = None
        self.o: E = None
        self.s: E = None
        self.t: D = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: I = None
        self.u: F = None
        self.x: G = None
        self.q: B = None
        self.r: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.p: I = None
        self.q: G = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: I = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.p: H = None
        self.r: E = None
        self.txt = txt

c = A("c")
a = B("a")
n = C("n")
b = D("b")
h = E("h")
f = F("f")
d = G("d")
l = H("l")
j = I("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: I = None
        self.u: F = None
        self.x: G = None
        self.q: B = None
        self.r: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.p: I = None
        self.q: G = None
        self.x: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: I = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: E = None
        self.p: H = None
        self.r: E = None
        self.txt = txt

c = A("c")
a = B("a")
n = C("n")
b = D("b")
h = E("h")
f = F("f")
d = G("d")
l = H("l")
j = I("j")

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