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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.y: D = None
        self.x: D = None
        self.z: D = None
        self.r: B = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.s: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: I = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: I = None
        self.y: D = None
        self.x: D = None
        self.z: D = None
        self.r: B = None
        self.u: A = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: A = None
        self.s: E = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: C = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: I = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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