class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: H = None
        self.x: H = None
        self.q: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: E = None
        self.s: E = None
        self.w: H = None
        self.p: E = None
        self.z: F = None
        self.t: H = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: E = None
        self.s: E = None
        self.w: H = None
        self.p: E = None
        self.z: F = None
        self.t: H = None
        self.o: A = None
        self.txt = txt

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

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

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

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