class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.r: I = None
        self.x: B = None
        self.u: B = None
        self.z: G = None
        self.s: A = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.r: I = None
        self.x: B = None
        self.u: B = None
        self.z: G = None
        self.s: A = None
        self.t: G = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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