class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: H = None
        self.y: F = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: D = None
        self.p: A = None
        self.w: D = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.r: G = None
        self.q: I = None
        self.o: D = None
        self.v: B = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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

f.q = d
f.w = a
f.t = a
f.y = c
n.u = a
n.t = b
n.w = b
n.p = f
n.o = d
n.x = i
i.t = d
i.u = d
i.r = k
i.z = k
i.q = j
i.o = b
i.v = n
b.o = d
d.y = i
d.p = a
c.q = f
c.x = d
c.v = a
k.x = i
k.y = i
k.s = j
a.w = c
a.t = c
j.w = a
l.u = a
l.t = b
l.w = b
l.p = f
l.o = d
l.x = i
assert c.v.t.x.y.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: H = None
        self.y: F = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: D = None
        self.p: A = None
        self.w: D = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: E = None
        self.r: G = None
        self.q: I = None
        self.o: D = None
        self.v: B = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: F = None
        self.txt = txt

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

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

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