class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.z: A = None
        self.r: A = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.q: G = None
        self.o: F = None
        self.v: E = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.o: C = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

d = A("d")
f = B("f")
b = C("b")
j = D("j")
i = E("i")
h = F("h")
m = G("m")
g = E("g")
k = A("k")

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.q: G = None
        self.o: F = None
        self.v: E = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: E = None
        self.o: C = None
        self.z: D = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

d = A("d")
f = B("f")
b = C("b")
j = D("j")
i = E("i")
h = F("h")
m = G("m")
g = E("g")
k = A("k")

d.w = j
d.p = j
d.q = m
d.z = k
d.r = k
d.y = f
f.u = h
b.p = f
b.s = h
b.o = h
b.q = m
b.t = m
b.v = i
j.u = h
j.p = h
i.p = b
i.w = b
i.o = j
h.p = k
h.t = g
h.o = b
h.z = j
h.y = f
m.z = j
m.x = h
m.t = f
m.r = d
g.p = b
g.w = b
g.o = j
k.w = j
k.p = j
k.q = m
k.z = d
k.r = d
k.y = f
assert k.q.z.u.o.v.w.p.txt == "f"