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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: H = None
        self.y: H = None
        self.q: H = None
        self.z: D = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.z: E = None
        self.y: C = None
        self.w: H = None
        self.x: G = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.w: C = None
        self.z: B = None
        self.q: D = None
        self.t: C = None
        self.s: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.w: H = None
        self.y: H = None
        self.q: H = None
        self.z: D = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.z: E = None
        self.y: C = None
        self.w: H = None
        self.x: G = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: E = None
        self.w: C = None
        self.z: B = None
        self.q: D = None
        self.t: C = None
        self.s: H = None
        self.txt = txt

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

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