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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.t: I = None
        self.r: I = None
        self.q: F = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.q: H = None
        self.w: C = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.r: A = None
        self.y: B = None
        self.w: A = None
        self.x: G = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.t: I = None
        self.r: I = None
        self.q: F = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.q: H = None
        self.w: C = None
        self.s: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: G = None
        self.r: A = None
        self.y: B = None
        self.w: A = None
        self.x: G = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

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

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

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