class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: H = None
        self.v: E = None
        self.z: A = None
        self.u: D = None
        self.w: B = None
        self.o: G = None
        self.y: A = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.z: A = None
        self.v: A = None
        self.u: A = None
        self.p: D = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.p: C = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: G = None
        self.z: A = None
        self.v: A = None
        self.u: A = None
        self.p: D = None
        self.y: G = None
        self.txt = txt

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

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